package com.itheima.chapter10.thread.demo9;

//守护线程
public class Demo {
    public static void main(String[] args) {
        MyThread1 mt1 = new MyThread1();
        MyThread2 mt2 = new MyThread2();
        mt1.setName("女神");
        mt2.setName("备胎");
        mt2.setDaemon(true);
        //mt2设置为守护线程
        mt1.start();
        mt2.start();

    }
}
